<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>JavaScript12月2日作业</title>
    <script src="homework01.js" type="text/javascript"></script>
    <style type="text/css">
        .one, .two {
            margin: 0 auto;
            border: 1px solid #000;
            width: 300px;
            height: 200px;
        }

        .p1 {
            margin-left: 20px;
        }

        .i1 {
            margin-left: 120px;
        }
    </style>
</head>
<body>
<div class="one">
    <h2 style="text-align: center">求出阶乘</h2>
    <p class="p1">项数：<input type="text" id="num"></p>
    <p class="p1">结果：<input type="text" id="result" readonly></p>
    <input class="i1" value="计算" onclick="calc()" type="button">
</div>
<div class="two">
    <h2 style="text-align: center">登陆界面</h2>
    <p class="p1">用户名：<input type="text" id="name"></p>
    <p class="p1">密码：<input type="text" id="pass"></p>
    <input class="i1" value="登陆" onclick="reg()" type="button">
</div>

</body>
</html>